import random

list = [ random.randint(1,100) for i in range(10) ]
print("排序前:",list)

for i in range(len(list)):
    for j in range(len(list)-i-1):
        if list[j] > list[j+1]:
            list[j],list[j+1] = list[j+1],list[j]
print("冒泡排序后：",list)